package com.telenav.module.map;

import com.telenav.framework.mvc.AbstractController;
import com.telenav.framework.mvc.AbstractModel;
import com.telenav.framework.mvc.AbstractView;
import com.telenav.framework.mvc.StateMachine;
import com.telenav.module.activitylist.ActivityListController;
import com.telenav.ui.AndroidUiHelper;


public class SmartMapController extends AbstractController implements ISmartMapConstants {

	private final static int[][] STATE_TABLE = new int[][] { { STATE_VIRGIN,
			EVENT_CONTROLLER_START, STATE_INIT, ACTION_INIT } };
	
	public SmartMapController(AbstractController superController) {
		super(superController);
		
	}

	@Override
	protected AbstractView createView() {
		return new SmartMapView(AndroidUiHelper.getInstance().getContext());
	}

	@Override
	protected AbstractModel createModel() {
		return new SmartMapModel();
	}

	@Override
	protected StateMachine createStateMachine() {
		return new StateMachine(STATE_TABLE_COMMON, STATE_TABLE);
	}

	@Override
	protected void postStateChange(int currentState, int nextState) {
        switch (nextState)
        {
            case STATE_VIRGIN:
            {
            	ActivityListController activityListController = new ActivityListController(this);
            	activityListController.init();
                break;
            }
        }
		
	}

}
